package com.kasinf.springcloud.alibaba.service.impl;

import com.kasinf.springcloud.alibaba.dao.AccountDao;
import com.kasinf.springcloud.alibaba.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @author KAISER
 */
@Slf4j
@Service
public class AccountServiceImpl implements AccountService {

    @Resource
    private AccountDao accountDao;

    @Override
    public void decrease(Long userId, BigDecimal money) {
        log.info("------> account-service 中开始扣减账户余额");
        accountDao.decrease(userId, money);
        log.info("------> account-service 中扣减账户余额完成");
    }
}
